#include<stdio.h>
#define MAX 200
int main()
{
	int a[MAX],n,i,b,count;
	n=10;
	count=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	scanf("%d",&b);
	for (i=0;i<n;i++)
	{
		if(a[i]<=b+30)
		count++;
	}
	printf("%d",count);
}
